<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
	<span class="myInfoBox"> <p:panel header="Me">
			<h:panelGrid columns="2" cellspacing="0" cellpadding="2"
				style="width:100%; height: 100%;">
				<h:graphicImage alt="Facebook profile image"
					url="https://graph.facebook.com/#{userSession.facebookUserAdapter.userId}/picture" />
				<h:outputText style="font-size: 1.1em; overflow:hidden;"
					value="#{userSession.facebookUserAdapter.getMeField('name')}" />
			</h:panelGrid>
		</p:panel>
	</span>
	<span class="lastReadingBox"> <p:panel
			header="My last sensor reading">
			<h:panelGrid columns="2" cellspacing="2" cellpadding="2"
				style="width:100%; height: 100%; overflow:auto">
				<h:panelGroup>
					<h:outputText styleClass="lastReading"
						value="#{userSession.subjectDbAdapter.measurements.elementAt(0).value}"
						style="vertical-align: middle;" />
					<h:outputText styleClass="lastReadingLabel"
						value="#{userSession.subjectDbAdapter.measurements.elementAt(0).sensorSpec.unit}"
						style="vertical-align: bottom;" />
				</h:panelGroup>
				<h:panelGrid columns="1" cellpadding="2">
					<h:outputText styleClass="lastReadingCaption"
						value="Sensor: #{userSession.subjectDbAdapter.measurements.elementAt(0).sensorSpec.type} (#{userSession.subjectDbAdapter.measurements.elementAt(0).sensorSpec.id})" />
					<h:outputText styleClass="lastReadingCaption"
						value="Taken: #{userSession.subjectDbAdapter.measurements.elementAt(0).dayString} at #{userSession.subjectDbAdapter.measurements.elementAt(0).timeString}" />
				</h:panelGrid>
			</h:panelGrid>
		</p:panel>
	</span>
</ui:composition>